home *** CD-ROM | disk | FTP | other *** search
Text File | 1997-02-13 | 4.8 KB | 208 lines | [TEXT/MPS ] |
-
- /*
- * This file was generated by the SOM Compiler.
- * FileName: ObjectNS.xh.
- * Generated using:
- * SOM Precompiler somipc: 2.18
- * SOM Emitter emitxh.dll: 2.33
- */
-
- /*
- *
- * Classes defined in this interface
- *
- */
-
-
- #ifndef SOM_ODObjectNameSpace_xh
- #define SOM_ODObjectNameSpace_xh
-
- class ODObjectNameSpace;
-
- #define ODObjectNameSpace_MajorVersion 1
- #define ODObjectNameSpace_MinorVersion 0
-
- /* C++ SOM defs */
- #include <somcls.xh>
- #include <somcm.xh>
-
- /* C++ parent defs */
- #ifndef SOM_ODNameSpace_xh
- #include <NamSpac.xh>
- #endif
-
- #ifndef ODObjectNameSpace_API
- #define ODObjectNameSpace_API
- /*
- * -- The Class API
- */
-
- /*
- * Start of user-defined types:
- */
- class SOMClass;
- class SOMObject;
- class ODFrame;
- class ODFacet;
- class ODObject;
- class ODExtension;
- class ODNameSpace;
- class ODStorageUnitView;
- class ODObjectNameSpace;
- class ODObjectIterator;
-
- /*
- * End of user-defined types.
- */
-
- #ifdef OLDIBMSOMAPISUPPORT
- #define ODObjectNameSpaceCClassData ODObjectNameSpaceClassData
- #define ODObjectNameSpaceNewClass(major,minor) somNewVersionedClassReference(ODObjectNameSpace,major,minor)
- #endif
-
- /* define xxxMetaClass macro to facilitate (cls ## MetaClass) */
- #define ODObjectNameSpaceMetaClass SOMClass
-
- #if PRAGMA_ALIGN_SUPPORTED
- # pragma options align=power
- #endif
-
- /* The API to the ODObjectNameSpace class object, and the methods it introduces. */
- SOMEXTERN struct ODObjectNameSpaceClassDataStructure {
- #ifdef OLDIBMSOMAPISUPPORT
- SOMClass *classObject; /* always zero, use somNewClassReference instead */
- #else
- long zero;
- #endif
- somStaticClassInfo *sci;
- somDToken instanceDataToken;
- long reserved [3];
- somMToken Register;
- somMToken GetEntry;
- somMToken CreateIterator;
- somMToken reserved1;
- } SOMDLINK ODObjectNameSpaceClassData;
-
- #if PRAGMA_ALIGN_SUPPORTED
- # pragma options align=reset
- #endif
-
- #if !defined(ODObjectNameSpace_Class_Source) && !defined(SOM_Module_objectns_Source)
- #if PRAGMA_IMPORT_SUPPORTED
- #pragma import list ODObjectNameSpaceClassData
- #endif
- #endif
-
-
- /*
- * -- Typedefs and inline method declarations for left path inherited methods
- * -- are omitted because this compilation had -museinheritedmethods in effect
- */
-
-
- /*
- * -- Typedefs for ODObjectNameSpace Method Procedures
- */
- SOMEXTERN {
- typedef void (* SOMLINK somTD_ODObjectNameSpace_Register)(ODObjectNameSpace *somSelf, Environment *ev,
- ODISOStr key,
- ODObject* object);
- typedef ODBoolean (* SOMLINK somTD_ODObjectNameSpace_GetEntry)(ODObjectNameSpace *somSelf, Environment *ev,
- ODISOStr key,
- ODObject** object);
- typedef ODObjectIterator* (* SOMLINK somTD_ODObjectNameSpace_CreateIterator)(ODObjectNameSpace *somSelf, Environment *ev);
- }
-
- #endif /* ODObjectNameSpace_API */
-
-
- /*
- * -- This emitter treats Method Tokens as Thunks by default.
- * -- Use the sc modifier "nothunks" to change this default
- */
- #undef somresolve_
- #define somresolve_(obj,mToken) ((somMethodProc*)((void)obj, mToken))
-
- /*
- * -- The C++ Wrapper Class for ODObjectNameSpace
- */
- class ODObjectNameSpace : public ODNameSpace
- {
- public:
-
- // ODObjectNameSpace::new registers use of the class object, and then uses somNew
- // to allocate memory and load the object method table pointer.
- void *operator new(size_t size)
- {
- SOM_IgnoreWarning(size);
- // Allocate memory using the default allocator for ODObjectNameSpace, and
- // clear mem & set method table pointer, call basic initialization
- #ifdef SOMCHKNULL
- void * __somResult = (void *)
- somNewObject(ODObjectNameSpace);
- SOMCHKNULL(__somResult);
- return __somResult;
- #else
- return (void*) somNewObject(ODObjectNameSpace);
- #endif
- }
-
- // ODObjectNameSpace::delete uses the default deallocator for the object's class.
- void operator delete(void * obj)
- {
- if (obj) {
- SOM_Resolve(obj,SOMObject,somFree)
- ( (SOMObject*) obj );
- }
- }
-
- /* method: Register */
- void Register(Environment *ev,
- ODISOStr key,
- ODObject* object)
- {
- SOM_ResolveD(this,ODObjectNameSpace,ODObjectNameSpace,Register)
- (this,ev,key,object);
- #ifdef SOMCHKEXCEPT
- SOMCHKEXCEPT;
- #endif
- }
-
- /* method: GetEntry */
- ODBoolean GetEntry(Environment *ev,
- ODISOStr key,
- ODObject** object)
- {
- #ifdef SOMCHKEXCEPT
- ODBoolean __somResult =
- SOM_ResolveD(this,ODObjectNameSpace,ODObjectNameSpace,GetEntry)
- (this,ev,key,object);
- SOMCHKEXCEPT;
- return __somResult;
- #else
- return SOM_ResolveD(this,ODObjectNameSpace,ODObjectNameSpace,GetEntry)
- (this,ev,key,object);
- #endif
- }
-
- /* method: CreateIterator */
- ODObjectIterator* CreateIterator(Environment *ev)
- {
- #ifdef SOMCHKEXCEPT
- ODObjectIterator* __somResult =
- SOM_ResolveD(this,ODObjectNameSpace,ODObjectNameSpace,CreateIterator)
- (this,ev);
- SOMCHKEXCEPT;
- return __somResult;
- #else
- return SOM_ResolveD(this,ODObjectNameSpace,ODObjectNameSpace,CreateIterator)
- (this,ev);
- #endif
- }
-
- }; /* ODObjectNameSpace */
-
-
-
- #endif /* SOM_ODObjectNameSpace_xh */
-